- How many males are there?
How many females?
- Males = 1, female = 0
- How many smokers are there?
- Smoker = 1, non-smoker = 0
- How many people are above the
mean age of the dataset?
Your Turn: heart.csv
Hints:
- File → Import Data → From
Text
- summary(dataset$vector)
- ifelse(conditional, if true, else
false)
- sum()